package com.ruoyi.quartz.domain.enums;

public enum TaskEnum {

    AUDIT("audit", "审核");

    private final String code;
    private final String description;

    TaskEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static TaskEnum fromCode(String code) {
        for (TaskEnum status : TaskEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown code: " + code);
    }
    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

}
